<?php


namespace app\api\server\banner;


use app\admin\ServerBase;
use app\admin\validate\BannerVal;
use app\api\model\BannerModel;
class BannerServer extends ServerBase
{
    protected $request;
    protected $model;
    function __construct($request)
    {
        $this->request=$request;
        $this->param=$request->param();
        $this->model=new BannerModel();
        $this->validate = new BannerVal();
    }
    function getList()
    {
        [$list, $count] = $this->model->getList(
            $this->request,
            ['status'=>1],
            'img,url',
            1,
            9999);
        $result['data'] = $list;
        $result['count'] = $count;
        $this->getMessageCode('adminMessage.success.select', 2);
        return $result;
    }
}